package com.xxgc.eow.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 管理员表
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-19
 */
@Getter
@Setter
@Schema(name = "Admin", description = "管理员表")
public class Admin implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "管理员id")
    @TableId(value = "admin_id", type = IdType.AUTO)
    private Integer adminId;

    @Schema(description = "用户名")
    private String adminName;

    @Schema(description = "管理员密码")
    private String adminPassword;

    @Schema(description = "头像地址")
    private String adminUrl;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "销毁时间")
    private LocalDateTime destroyTime;

    @Schema(description = "假删除状态")
    private Byte tip;

    public Admin(String adminName, String adminPassword, String adminUrl, LocalDateTime createTime, LocalDateTime destroyTime, Byte tip) {
        this.adminName = adminName;
        this.adminPassword = adminPassword;
        this.adminUrl = adminUrl;
        this.createTime = createTime;
        this.destroyTime = destroyTime;
        this.tip = tip;
    }

    public Admin(String adminName, String adminPassword) {
        this.adminName = adminName;
        this.adminPassword = adminPassword;
    }

    public Admin() {
    }

    @Override
    public String toString() {
        return "Admin{" +
                "adminId=" + adminId +
                ", adminName='" + adminName + '\'' +
                ", adminPassword='" + adminPassword + '\'' +
                ", adminUrl='" + adminUrl + '\'' +
                ", createTime=" + createTime +
                ", destroyTime=" + destroyTime +
                ", tip=" + tip +
                '}';
    }
}
